package com.cskaoyan.service.wx;

import com.cskaoyan.bean.wx.WxTestBean;
import com.cskaoyan.bean.wxbean.WxHomeBean.*;
import com.cskaoyan.mapper.wx.HomeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Enzo Cotter on 2020/10/7.
 */
@Service
public class HomeServiceImpl implements HomeService {
    @Autowired
    HomeMapper homeMapper;
    @Override
    public WxTestBean selectWxTestBean() {
        WxTestBean wxTestBean = new WxTestBean();
        List<NewGoodsListBean> newGoodsListBeans = homeMapper.selectNewGoodsList();
        wxTestBean.setNewGoodsList(newGoodsListBeans);
        List<CouponListBean> couponListBeans = homeMapper.selectCouponList();
        wxTestBean.setCouponList(couponListBeans);
        List<ChannelBean> channelBeans = homeMapper.selectChannel();
        wxTestBean.setChannel(channelBeans);
        List<GrouponListBean> grouponListBeans = homeMapper.selectGrouponList();
        wxTestBean.setGrouponList(grouponListBeans);
        List<BannerBean> bannerBeans = homeMapper.selectBanner();
        wxTestBean.setBanner(bannerBeans);
        List<BrandListBean> brandListBeans = homeMapper.selectBrandList();
        wxTestBean.setBrandList(brandListBeans);
        List<HotGoodsListBean> hotGoodsListBeans = homeMapper.selectHotGoodsList();
        wxTestBean.setHotGoodsList(hotGoodsListBeans);
        List<TopicListBean> topicListBeans = homeMapper.selectTopicList();
        wxTestBean.setTopicList(topicListBeans);
        List<FloorGoodsListBean> floorGoodsListBeans = homeMapper.selectFloorGoodsList();
        wxTestBean.setFloorGoodsList(floorGoodsListBeans);
        return wxTestBean;
    }
}
